package com.ylsdxy.school_sys_set.config;

//import org.springframework.context.annotation.Configuration;
//import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
//import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
//import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter;

/**
 * 作用类似于网关过滤器：哪些URI是可以放行的，哪些是需要登录的
 */
//@Configuration
//@EnableResourceServer   // 资源服务器
//@EnableGlobalMethodSecurity(prePostEnabled = true)
//public class OauthAuthorizationConfig extends ResourceServerConfigurerAdapter {
//    @Override
//    public void configure(HttpSecurity http) throws Exception {
//        http.authorizeRequests()
//                .antMatchers("/schoolSet/find**").permitAll()  // 不需要认证
//                .anyRequest().authenticated();  // 需要认证
//    }
//}
